home *** CD-ROM | disk | FTP | other *** search
- /*
- * gemext : extension for gemlib bindings (++jrb bammi@cadence.com)
- */
-
- #ifndef _COMMON_H
- #define _COMMON_H
-
- /* Array sizes in vdi control block */
-
- #define CNTRLMAX 12 /* It seems that 11 is enough - max reached
- for vex_* functions */
- #define INTINMAX 255 /* This library will allow strings up to this
- size in v_gtext and vr[qm]_string */
- #define INTOUTMAX 45 /* A limit for number of elements in _intout
- for usual functions - reached for v_opnwk */
- #define PTSINMAX 1024 /* Max number of points in _ptsin - 2 shorts
- for a point. Value raised to accomodate
- TT and fsmgdos printer drivers */
- #define PTSOUTMAX 6 /* Max number of points in _ptsout - 2 shorts
- for a point. Max reached in v_opnwk */
-
- /* Size for _global in aes control block - most other stuff overlapped
- with arrays for vdi - sizes needed for _control, _int_in, _int_out,
- respectively are 5, 16 and 7 shorts and 2 and 1 longs for
- _addrin and addrout */
-
- #define GLOBMAX 15
-
- #define _control (&_contrl[0])
- #define _int_in (&_intin[0])
- #define _int_out (&_intout[0])
- #define _addrin ((void **)(&_ptsin[0]))
- #define _addrout ((void **)(&_ptsout[0]))
-
-
- /* code up _control[] elements for __aes__() calls
- * (evaluated at compile time, no runtime overhead)
- * see common.c for encoding semantics.
- */
- #define AES_CONTROL_ENCODE(A, B, C, D) (unsigned long) \
- ( \
- (((unsigned long)A) << 24) | \
- (((unsigned long)B) << 16) | \
- (((unsigned long)C) << 8) | \
- (((unsigned long)D) ) \
- )
-
- extern short _intin[INTINMAX], _intout[INTOUTMAX];
- extern short _ptsin[2 * PTSINMAX], _ptsout[2 * PTSOUTMAX];
- extern unsigned short _contrl[CNTRLMAX], _global[GLOBMAX];
- extern int gl_apid, gl_ap_version;
- extern void *_vdiparams[];
- #endif
-
- /* aes trap interface func */
- extern int __aes__(unsigned long coded_control);
-